
export const email: string = "([a-zA-Z0-9._-]+@[a-zA-Z0-9._-]+\\.[a-zA-Z0-9._-]+)"

export const COMPOSE_IMG_REGEX = /<img.*?src=\"(.*?)\"[^>]*>/g

export class StringMatchUtil {

  static regexEmail(str: string): boolean {
    let regex = new RegExp(email);
    return regex.test(str)
  }

  /**
   * 是否是a-zA-Z的字母
   * @param str
   */
  static isAlphabet(str:string) {
    let regex = new RegExp("[a-zA-Z]+");
    return regex.test(str)
  }

  static regex(rex: string, str: string) {
    return str.match(rex);
  }
}